import http from './http.js';
export function login(params) {
    return http.post(`/req/api/user/login`,params)
}

export function register(params) {
    return http.post(`/req/api/user/user`,params)
}

export function getWorldData() {
    return http.get(`https://api.inews.qq.com/newsqa/v1/automation/foreign/country/ranklist`)
}
export function getChineseData() {
    return http.get(`https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=statisGradeCityDetail,diseaseh5Shelf`)
}
export function getProvinceData(areaCode) {
    return http.get(`/test/ug/api/wuhan/app/data/list-by-area-code?areaCode=${areaCode}`)
}
export function getWorldTotalNum() {
    return http.get(`/req/api/covid/summary/world`)
}
export function getCovidWorld() {
    return http.get(`/req/api/covid/world`)
}
export function getCovidChina() {
    return http.get(`/req/api/covid/china`)
}
export function getCovidProvince() {
    return http.get(`/req/api/covid/province`)
}

export function getAllCountryNum() {
    return http.get(`/req/api/covid/china`)
}
export function getAllUer() {
    return http.get(`/req/api/user/user`)
}
export function modifyUser(params) {
    return http.put(`/req/api/user/user/${params.id}`,{username:params.username,password: params.password,create_datetime:params.create_datetime })
}
export function deleteUser(id) {
    return http.delete(`/req/api/user/user/${id}`)
}

